<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script src="./index.js"></script>
<script>
	// 可以指定多个成功-失败回调函数
	const p = new Promise(function(resolve,reject){
		setTimeout(()=>{
			reject(1);
		})
	});
	p.then(function(value){
		console.log("成功回调1",value);
	},function(reason){
		console.log("失败回调1",reason);
	});
	p.then(function(value){
		console.log("成功回调2",value);
	},function(reason){
		console.log("失败回调2",reason);
	});
	p.then(function(value){
		console.log("成功回调3",value);
	},function(reason){
		console.log("失败回调3",reason);
	});
</script>

</html>